USE [QLDL]
GO

/****** Object:  StoredProcedure [dbo].[sp_SuaThongTinLoaiDaiLy]    Script Date: 01/03/2011 15:27:59 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE procedure [dbo].[sp_SuaThongTinLoaiDaiLy]
	@MaLoaiDaiLy nvarchar(10), @TienNoToiDa money
as
begin
	if exists(select * from DAILY where (MaLoaiDaiLy = @MaLoaiDaiLy) and (TienNo > @TienNoToiDa))
		return 1
		
	update LOAIDAILY set TienNoToiDa = @TienNoToiDa where MaLoaiDaiLy = @MaLoaiDaiLy
	return 0
end
GO


